﻿using System;

namespace KuiHuaBaoDian.Services.Lockstep {

    public readonly struct LockstepClientID {

        public Guid GUID { get; init; }

        public override bool Equals(object obj) {
            if (obj is LockstepClientID other) {
                return other.GUID == GUID;
            }
            return false;
        }

        public override int GetHashCode() => GUID.GetHashCode();

        public override string ToString() => $"[{nameof(LockstepClientID)}({GUID})]";

        public static bool operator ==(LockstepClientID left, LockstepClientID right) => left.Equals(right);
        public static bool operator !=(LockstepClientID left, LockstepClientID right) => !left.Equals(right);
    }
}
